<?xml version="1.0" encoding="utf-8"?>
<sqltoy xmlns="https://www.sagframe.com/schema/sqltoy"
        xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="https://www.sagframe.com/schema/sqltoy https://www.sagframe.com/schema/sqltoy/sqltoy.xsd">
    <!-- #(table.title)列表 -->
    <sql id="#(firstToLowerCase(table.name))_list">
#--        #for(column:table.columns)
        #if(column.isVisibleInList()&&column.dict)
        <translate cache="dict" columns="#(column.code)" cache-type="#(column.dict)" />
        #else if(column.isVisibleInList()&&column.translate)
        <translate cache="#(column.translate)" columns="#(column.code)" />
        #end
        #end
        #for(column:table.Columns)
        #if(column.isVisibleInForm())
        #switch(column.controlType)
        #case('Time')
        <date-format columns="#(column.code)" format="HH:mm:ss"/>
        #case('Date')
        <date-format columns="#(column.code)" format="yyyy-MM-dd"/>
        #case('DateTime')
        <date-format columns="#(column.code)" format="yyyy-MM-dd HH:mm"/>
        #end
        #end
        #end
        --#
        <value>
            <![CDATA[
                SELECT #(table.listFields) FROM #(table.code) WHERE 1=1
                #for(column:table.columns)
                #if(column.isSearchCondition())
                #[and #(column.code) = :#(column.field)]
                #end
                #end
            ]]>
		</value>
    </sql>
</sqltoy>
